// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 根据奖状id删除对应的奖状信息 POST /api/user/deletedAwardById/${param0} */
export async function deletedAwardByIdUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deletedAwardByIdUsingPOSTParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.Rint>(`/api/user/deletedAwardById/${param0}`, {
    method: 'POST',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 找回密码 POST /api/user/findPassword */
export async function findPasswordUsingPost(
  body: API.zhaohuimimaxinxiVO,
  options?: { [key: string]: any }
) {
  return request<API.R>('/api/user/findPassword', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 查询老师或学生信息 GET /api/user/getAllUser */
export async function getAllUserUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getAllUserUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.RListyonghuxinxiVO>('/api/user/getAllUser', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 查询用户上传的奖状 GET /api/user/getAward */
export async function getAwardUsingGet(options?: { [key: string]: any }) {
  return request<API.RListAwardRecords>('/api/user/getAward', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 查询专业信息列表 GET /api/user/getCollegeMajor */
export async function getCollegeMajorUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getCollegeMajorUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.RListzhuanyexinxiduixiang>('/api/user/getCollegeMajor', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  })
}

/** 获取登录用户 GET /api/user/getLoginUser */
export async function getCurrentLoginUserUsingGet(options?: { [key: string]: any }) {
  return request<API.RyonghuxinxiVO>('/api/user/getLoginUser', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 查询通知列表 GET /api/user/getNotice */
export async function getNoticeListUsingGet(options?: { [key: string]: any }) {
  return request<API.RListNotice>('/api/user/getNotice', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 根据用户id返回该用户所获得的奖项 GET /api/user/getUserAward */
export async function getawardbyIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getawardbyIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.RListjiangxiangxinxiVO>('/api/user/getUserAward', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 查询用户信息 POST /api/user/getUserInfo */
export async function getUserInfoUsingPost(options?: { [key: string]: any }) {
  return request<API.RyonghuxinxiVO>('/api/user/getUserInfo', {
    method: 'POST',
    ...(options || {}),
  })
}

/** 根据学号查询用户信息 POST /api/user/getUserInfoByNumber */
export async function getUserInfoByNumberUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserInfoByNumberUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.RyonghuxinxiVO>('/api/user/getUserInfoByNumber', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 用户登录功能 POST /api/user/login */
export async function loginUsingPost(
  body: API.yonghudengluxinxi,
  options?: { [key: string]: any }
) {
  return request<API.Rstring>('/api/user/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 用户退出登录功能 POST /api/user/logout */
export async function logoutUsingPost(options?: { [key: string]: any }) {
  return request<API.R>('/api/user/logout', {
    method: 'POST',
    ...(options || {}),
  })
}

/** 已读通知 PUT /api/user/readNotice/${param0} */
export async function readNoticeUsingPut(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.readNoticeUsingPUTParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.R>(`/api/user/readNotice/${param0}`, {
    method: 'PUT',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 用户注册功能 POST /api/user/register */
export async function registerUsingPost(
  body: API.yonghuzhucexinxi,
  options?: { [key: string]: any }
) {
  return request<API.Rlong>('/api/user/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 编辑用户信息 POST /api/user/updateUserInfo */
export async function updateUserInfoUsingPost(
  body: API.yonghuxinxiduixiang,
  options?: { [key: string]: any }
) {
  return request<API.R>('/api/user/updateUserInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 上传/更新用户头像 POST /api/user/uploadAvatar */
export async function uploadAvatarUsingPost(body: string, options?: { [key: string]: any }) {
  return request<API.Rstring>('/api/user/uploadAvatar', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 用户上传奖状功能 POST /api/user/uploadAward */
export async function uploadAwardUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.uploadAwardUsingPOSTParams,
  body: string,
  options?: { [key: string]: any }
) {
  return request<API.RAwardRecords>('/api/user/uploadAward', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  })
}
